<template>
  <div id="app">
  <Navbar v-show="isShowNavbar"></Navbar>
    <div id ="content">
      <transition name="router-transition" mode="out-in">
        <router-view></router-view>
      </transition>
    </div>
  </div>
</template>

<script>
import Navbar from './component/nav-bar.vue';

const DISABLE_NAVBAR_ROUTER_LIST = ['login', 'setPasswordPage'];

export default {
  data() {
    return {};
  },
  components: {
    Navbar,
  },
  computed: {
    isShowNavbar() {
      const routerName = this.$route.name;
      return DISABLE_NAVBAR_ROUTER_LIST.indexOf(routerName) === -1;
    },
  },
  mounted() {},
  methods: {
  },
};
</script>

<style>
#app {
  font-family: Helvetica, sans-serif;
  min-width: 980px;
}
.router-transition-enter-active {
  transition: all 0.3s ease;
}
.router-transition-leave-active {
  transition: all 0.5s ease;
}
.router-transition-enter,
.router-transition-leave-active {
  transform: translateY(20px);
  opacity: 0;
}
</style>
